﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;

namespace BEX.Core.Exchange.BITFINEX
{
    public class BitfinexResponse
    {
        public BitfinexResponse(string json)
            : this(JObject.Parse(json))
        {
        }

        private JObject __jobject;
        public BitfinexResponse(JObject obj)
        {
            this.__jobject = obj;
        }

        public string mid
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "mid"));
            }
        }

        public string bid
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "bid"));
            }
        }

        public string ask
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "ask"));
            }
        }

        public string last_price
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "last_price"));
            }
        }

        public string timestamp
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "timestamp"));
            }
        }
    }
}
